package com.java83.controller;

import com.github.pagehelper.PageInfo;
import com.java83.dto.impl.OneDto;
import com.java83.entity.ResponseEntity;
import com.java83.entity.Trainee;
import com.java83.service.TraineeService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: ljy
 * @date: 2021/12/14 12:22
 * @decription:
 */
@RestController
@RequestMapping("/trainee")
public class TraineeController {

    @Autowired
    TraineeService traineeService;


    @ApiOperation("条件查询试用期表")
    @PostMapping("/findByParams")
    public ResponseEntity<PageInfo> findByParams(@RequestBody OneDto<Trainee> oneDto){

        PageInfo<Trainee> traineePageInfo = traineeService.selectAll(oneDto);

        return new ResponseEntity(200,"success",traineePageInfo);
    }

}
